package com.itheima.bean;

import java.io.Serializable;

public class Menu implements Serializable {
    private String dishName; //菜品名称
    private double price; //菜品价格

    // 添加 serialVersionUID 标记类序列化编号，可以避免再次修改类时出现的java.io.InvalidClassException
    private static final long serialVersionUID = 1L;

    public Menu() {
    }

    public Menu(String dishName, double price) {
        this.dishName = dishName;
        this.price = price;
    }

    public String getDishName() {
        return dishName;
    }

    public void setDishName(String dishName) {
        this.dishName = dishName;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return "菜品名称: " + this.getDishName() + "\t\t菜品价格: " + this.getPrice();
    }
}
